home *** CD-ROM | disk | FTP | other *** search
/ The Business Master (3rd Edition) / The Business Master (3rd Edition).iso / files / utilfile / dos4pros / xmanual.exe / XMANUAL.DOC < prev   
Encoding:
Text File  |  1992-05-11  |  62.4 KB  |  1,824 lines

  1.     (manual.doc)
  2.  
  3.         Welcome to DOS Extensions for Professionals
  4.     
  5.     This is the Shareware Version of "DOS Extensions for Professionals", 
  6.     a Unified Package of file utilities bringing to the PC the power,
  7.     functionality, and increased personal productivity usually associated
  8.     only with minicomputer-based software.  Designed to meet the processing
  9.     needs of the corporate community as well as of demanding home users,
  10.     these utilities feature designed-in robustness, flexibility, and
  11.     generality leading to predictable results in the most trying and
  12.     unusual situations.
  13.  
  14.     These programs are not crippled or hamstrung in any way.  They are,
  15.     in fact, identical to those offered in the full retail version.
  16.     
  17.     Use these programs and test them for THREE WEEKS to see if they meet
  18.     your daily needs.  If you don't like these programs - if they don't
  19.     help you solve your problems, delete them from your disk.  You are
  20.     under no further obligation.
  21.  
  22.     If, however, you find these utilites useful and you want to make them
  23.     a permanent part of your collection, you must register to obtain a
  24.     full license for continued use.
  25.  
  26.     The "DOS Extensions for Professionals" registration fee is $19.  For 
  27.     that fee you recieve a printed manual, a full-use license, a new disk 
  28.     insuring you have the latest version of "DOS Extensions for 
  29.     Professionals", and mail product support as needed.
  30.  
  31.     To register, fill out the order form found in the file "REGISTER.DOC"
  32.     (copy register.doc prn), and send it with $19 plus $5 ($8 overseas)
  33.     shipping and handling to
  34.  
  35.                 Allison Software
  36.                  166 Shady Lane
  37.                 Apollo, PA  15613
  38.                   USA
  39.  
  40.     The latest version with printed manual and license will be shipped to 
  41.     you immediately. 
  42.  
  43.     Thank you for helping make shareware work.
  44.  
  45.  
  46.  
  47.  
  48.                         John Allison
  49.  
  50.  
  51.  
  52.  
  53.  
  54.             DOS Extensions for Professionals
  55.     Programs:
  56.  
  57.     Diff .................................................. 2
  58.         Notes
  59.           binary
  60.           output & synchronization
  61.  
  62.     Dump .................................................. 4
  63.         Notes
  64.           viewing deleted directories ............ 7
  65.           boot tables ............................ 8
  66.             the boot sector
  67.             the media descriptor byte
  68.             directory format
  69.           disk tutor ............................. 9
  70.             the boot sector
  71.             the file allocation table
  72.             directories
  73.             the root directory
  74.  
  75.     Search ............................................... 14
  76.         Notes
  77.           binary
  78.  
  79.     Split ................................................ 16
  80.  
  81.     Sub .................................................. 18
  82.         Notes ................................... 21
  83.           file renaming convention
  84.           order of execution
  85.  
  86.     Xdel ................................................. 23
  87.         Notes ................................... 24
  88.           XDEL and XDIR contrasted
  89.           secure deletes
  90.  
  91.     Xdir ................................................. 26
  92.  
  93.     Xhelp ................................................ 29
  94.  
  95.     General Topics:
  96.  
  97.     Command Modifiers .................................... 30
  98.  
  99.     Wildcards & Recursive Notation ....................... 30
  100.  
  101.     Implied Wildcards .................................... 31
  102.  
  103.     Examples of Notation ................................. 31
  104.  
  105.     Bug Reporting ........................................ 32
  106.  
  107.     Legalities ........................................... 33
  108.  
  109.                     2
  110.  
  111.  
  112. DIFF 
  113.     Displays the differences between two similar text files line-by-line.  
  114.     Whether you've made minor or massive changes, DIFF displays only the 
  115.     differences while resyncing on identical text.
  116.  
  117. usage:
  118.         diff  file_1  [file_2]  [/Comand_Modifiers...]
  119.  
  120.     If no file_2 is specified, file_2 takes the name of file_1
  121.     but with the extension ".BAK".
  122.  
  123.     Wildcards and recursive notation are not supported by the diff command.
  124.  
  125. Command Modifiers:
  126.  /case    /numbers    /notabs    /pause
  127.  
  128.  
  129.  
  130. EXAMPLES:
  131.  
  132.     Compare the files RESUME.TXT and RESUME.BAK ignoring any differences
  133.     due to changes in capitalization.
  134.  
  135.         DIFF  resume.txt  /nocase
  136.  
  137.     Note that because no second file was specified in the comparison,
  138.     RESUME.BAK was assumed.
  139.  
  140.     Compare two files outputing any differences without including their
  141.     respective line numbers.
  142.  
  143.         DIFF  source.c  source.old  /nonumbers
  144.  
  145.     The second version of a file was edited with a text processor which
  146.     replaces blanks with tabs.  Because blanks and tabs are not the same
  147.     character, the lines in which they fall would normally be displayed as
  148.     different.  In this case, flag only noticeable differences between the
  149.     two versions of the file.
  150.  
  151.         DIFF  smith.1  smith.2  /notabs
  152.  
  153.  
  154. NOTES:
  155. Binary -
  156.  
  157.     Diff is designed to work with text files only.  Using it to compare
  158.     binary files will give hard-to-interpret and unpredictable results.
  159.  
  160.     Comparing identical binary files will show them to be identical, but
  161.     slightly unidentical binary files may also test okay.  String
  162.     comparison functions which don't scan past the first null in any
  163.     given line are the immediate cause for this behavior.
  164.  
  165.  
  166.                     3
  167.  
  168.  
  169.     The real problem, however, is how to report inequities between binary
  170.     files and how to resynchronize after differences are found.  The line,
  171.     the normal unit of resynchronization, has no meaning in binary files.
  172.     Resync could be done on a byte-by-byte basis, but the value of the
  173.     whole effort seems questionable.
  174.  
  175.  
  176. Output -
  177.  
  178.     The diff command displays the differences between two text files
  179.     on a line-by-line basis.  Those lines which actually differ are
  180.     displayed, first those from "file A", followed by those from "file B",
  181.     a section at-a-time, until the entire files are compared.
  182.  
  183.     Diff does its best to resyncronize the two files, so if one has had
  184.     lines altered, added, or deleted, diff will recognize when these
  185.     sections of differences have past and will consider the files to be
  186.     matching again.
  187.  
  188.     The last lines to be output for the two files are the first ones
  189.     which match.  Three matching lines are actually required for
  190.     complete resyncronization.  You may find in an unmatching section
  191.     one or two identical lines surrounded by different lines.
  192.  
  193.     Both files are read and stored internally within an unmatched
  194.     section.  The rescanning effort increases as the square of the
  195.     number of unmatched lines.  If you compare two completely dissimilar
  196.     files, the process may run out of memory before the end of file
  197.     markers are detected.
  198.  
  199.     At the conclusion of a comparison, a summary is issued giving the
  200.     total number of lines in each file, the total number of differing
  201.     sections, and the total number of lines which differ.
  202.  
  203.                     4
  204.  
  205.  
  206. DUMP
  207.     Displays the contents of binary files, directories, disk sectors 
  208.     (including an interpreted boot sector), disk FAT's, and cluster chains.
  209.  
  210.     Addresses the internals of any file by sector or byte.  Searches the  
  211.     FAT for bad clusters, shows what's really in your directories, and  
  212.     snoops through deleted files.
  213.     
  214.     Explains the details of the DOS file structure with the on-line 
  215.     -DISK_TUTOR and -BOOT_TABLE help sections.
  216.     
  217. usage:
  218.     dump  [input_file]  [/Comand_Modifiers...]
  219.  
  220. Input File:
  221.     The name of any disk, file, or directory to be viewed.
  222.  
  223.     Wildcards and recursive notation are not supported by the dump command.
  224.  
  225. Command Modifiers:
  226. /boot      /byte  /cluster   /contents  /disk  /extended  /fat  /first
  227. /interpret /last  /numbering /pause     /sector
  228.  
  229.     See also -BOOT_TABLE and -DISK_TUTOR available from within dump.
  230.  
  231.  
  232.  
  233. EXAMPLES:
  234.  
  235.     Prepare output for a printer.
  236.  
  237.         DUMP  test.1  /noextended  /nopause  >  x.lis
  238.  
  239.     /Noextended suppresses control characters which might upset the printer.
  240.  
  241.     /Nopause should be used anytime the output is redirected to a file or
  242.     to a printer to avoid extra characters in the output and to avoid
  243.     having to strike a key after every page of data - the redirected
  244.     process will hang for no apparent reason.
  245.  
  246.     View the entire contents of the binary file PRINT.COM.
  247.  
  248.         DUMP  print.com
  249.  
  250.     If you wanted to view just the first 5 sectors, you can enter
  251.  
  252.         DUMP print.com /sector=1,5
  253.     or
  254.         DUMP print.com /first=5
  255.  
  256.     The range doesn't have to start with the first sector.  It can start
  257.     anywhere and can even be anchored to the end of the file.
  258.  
  259.         DUMP print.com /sector=-5,-1
  260.  
  261.                     5
  262.  
  263.  
  264.     or
  265.         DUMP print.com /last=5
  266.  
  267.     Of course /first or /last by itself means /first=1 or /last=1.
  268.  
  269.     Suppose you want to view the 1000th byte of a file.  There are 512
  270.     bytes/sector, so the 1000th byte must fall close to the end of the
  271.     second sector.  But it is simpler to say
  272.  
  273.         DUMP print.com /byte=1000
  274.  
  275.     and the line containing byte number 1000 is output.  Remember, unlike
  276.     sectors which are numbered in files (but not on the disk) from 1, the
  277.     first byte is byte 0.  To see the 1000th byte, you should actually ask
  278.     for /byte=999.
  279.  
  280.     Again, a range of bytes is permitted.  You could specify
  281.     /bytes=6500,6600 , or you could anchor the search from the last byte of
  282.     the file (-1) as in
  283.  
  284.         DUMP print.com /byte=-300,-200
  285.  
  286.     to see the second-to-the-last 100 bytes.  Of course the keywords /first
  287.     and /last are also operative here as in
  288.  
  289.         DUMP print .com /byte /first=600
  290.  
  291.     So far the output has been displayed in base 16 - hexadecimal.  You can
  292.     just as easily display it as good old- fashioned decimal or as base 8
  293.     (octal).
  294.  
  295.         DUMP  print.com  /contents=decimal
  296.     or
  297.         DUMP  print.com  /contents=octal
  298.  
  299.     Similar notation applies to numbering.  Byte numbering defaults to hex,
  300.     but you can force it to decimal or to octal.
  301.  
  302.         DUMP  print.com  /numbering=decimal
  303.     or
  304.         DUMP  print.com  /numbering=octal
  305.  
  306.     Closely related to files are directory and subdirectories.  Technically
  307.     these entities aren't files, but you can view them through a special
  308.     directory-interpreted dump.
  309.  
  310.         DUMP  .
  311.     and
  312.         DUMP  \
  313.  
  314.     dump the current and root directory.  The latter especially may hold
  315.     interesting hidden files as well as a volume id.
  316.  
  317.     In addition to viewing the contents of files and directories, DUMP
  318.  
  319.                     6
  320.  
  321.  
  322.     enables you to address disk sectors directly by using the /disk
  323.     modifier.  The first disk sector is 0.  (In files, DUMP considers the
  324.     first file sector to be 1.) Dump disk sectors 5 through 10 of the
  325.     current disk.
  326.  
  327.         DUMP  /disk=5,10
  328.     or
  329.         DUMP  /disk  /sector=5,10
  330.  
  331.     You can also address the last sector of the disk in different ways.
  332.  
  333.         DUMP  /disk=-1
  334.     or
  335.         DUMP  /disk  /last
  336.  
  337.     The first sector of a disk is special.  It is the boot sector.
  338.  
  339.         DUMP /disk /first
  340.  
  341.     gives the normal uninterpreted dump.  To get an interpreted dump of the
  342.     boot sector, enter
  343.  
  344.         DUMP /boot
  345.  
  346.     Try this on different sized disks.
  347.  
  348.     Related to the boot sector is an area following it called the FAT (File
  349.     Access Table.  See the discussion under Notes (Disk Tutor).) DUMP
  350.     allows you to view the FAT directly.
  351.  
  352.         DUMP /fat
  353.  
  354.     You can specify which clusters in the FAT to see by giving a range
  355.  
  356.         DUMP  /fat=6,100
  357.     or
  358.         DUMP  /fat  /first=30
  359.  
  360.     The first cluster is 2.
  361.  
  362.     Each cluster holds a single value - the number of the next cluster in
  363.     the chain.  There are special values which are assigned meanings: free
  364.     cluster, end of chain, and bad cluster.  Normally you see the
  365.     interpretations of these values.  If you want to see the values
  366.     themselves, use /nointerpret.
  367.  
  368.         DUMP /fat=-300,-200 /nointerpret
  369.  
  370.     A special kind of interpreted clusters are bad clusters set by the disk
  371.     formatter to mark bad disk sectors.  To view just these, enter
  372.  
  373.         DUMP /fat=bad
  374.  
  375.     The FAT is a collection of clusters - mappings of disk sectors.  As
  376.  
  377.                     7
  378.  
  379.  
  380.     mentioned above, clusters can be chained.  DUMP allows you to view
  381.     these chains in toto or to pick up anywhere within a chain and trace to
  382.     its end.
  383.  
  384.         DUMP print.com /cluster
  385.  
  386.     traces the entire chain associated with the file PRINT.COM telling you
  387.     in which logical disk sectors the file resides.  You can trace the
  388.     cluster chains of subdirectories even though we know directories aren't
  389.     files.
  390.  
  391.         DUMP .  /cluster
  392.  
  393.     Chain tracing doesn't work on the root directory because it isn't in
  394.     the FAT (it doesn't reside in the files area of the disk and is not
  395.     extensible.)
  396.  
  397.     By entering
  398.  
  399.         DUMP /cluster=68
  400.  
  401.     you pick up whatever chain, if any, includes cluster 68 tracing it to
  402.     its end.
  403.  
  404.  
  405. NOTES:
  406.  
  407. deleted directories -
  408.  
  409.     You can dump deleted directories in the standard directory format if
  410.     you know the sectors where the directory lay and, of course, it has
  411.     not yet been overwritten by new data.
  412.  
  413.     The command "dump  \" causes the root directory of the current
  414.     device to be dumped.  In the upper left corner there is identifying
  415.     information such as, "Sector 129  (1 of 32)".  Using the /sector=
  416.     Command Modifier, you can look at any range in those 32 sectors.  By
  417.     giving it a value greater than 32, you can look at any sector on the
  418.     disk through directory-colored-glasses.
  419.  
  420.     Subtract one less than the root starting sector from the desired sector
  421.     to calculate the proper offset.  In our example if you want to view
  422.     disk sector 661 as a directory, calculate the offset (661 - (129 - 1))
  423.     and enter
  424.  
  425.         DUMP \ /sector=533
  426.  
  427.  
  428.  
  429.                     8
  430.  
  431.  
  432. The Boot Sector -
  433.  
  434.     Byte    Size    Contents        Implemented
  435.  
  436.     00H     3       E9 XX XX or EB XX 90
  437.     03H     8       OEM name and version
  438.     0BH     2       bytes per sector
  439.     0DH     1       sectors per allocation unit
  440.     0EH     2       reserved sectors starting at
  441.             logical sector 0
  442.     10H     1       number of FAT's
  443.     11H     2       number of root directory entries
  444.     13H     2       total sectors in logical volume
  445.     15H     1       media descriptor byte
  446.     16H     2       number of sectors per FAT
  447.     18H     2       sectors per track       DOS 3.0
  448.     1AH     2       number of heads
  449.     1CH     4       number of hidden sectors        2 bytes DOS 3
  450.                             4 bytes DOS 4
  451.     20H     4       total sectors in logical volume DOS 4.0 &
  452.                             size > 32MB
  453.     24H     1       physical drive number
  454.     25H     1       reserved
  455.     26H     1       (29H) - extended boot signature
  456.     27H     4       32-bit binary volume ID
  457.     2BH     11      volume label
  458.     36H     8       reserved
  459.     3EH     193     bootstrap
  460.  
  461.  
  462. The Media Descriptor Byte -
  463.  
  464.     Code    Size    Description
  465.  
  466.     F0H     3.5     2-sided, 18 sector
  467.     F8H             fixed disk
  468.     F9H     5.25    2-sided, 15 sector
  469.         3.5     2-sided,  9 sector
  470.     FCH     5.25    1-sided,  9 sector
  471.  
  472.  
  473.     FDH     5.25    2-sided,  9 sector
  474.         8       1-sided,  single density
  475.     FEH     5.25    1-sided,  8 sector
  476.         8       1-sided,  single density
  477.         8       2-sided,  double density
  478.     FFH     5.25    2-sided,  8 sector
  479.  
  480.  
  481.                     9
  482.  
  483.  
  484. Directory Format -
  485.  
  486.     Byte    Size    Contents
  487.  
  488.     00      8       file name
  489.     08      3       extension
  490.     11      1       file attribute
  491.         bit
  492.         0       read only
  493.         1       hidden          (excluded from normal searches)
  494.         2       system          (excluded from normal searches)
  495.         3       volume label  (root directory only)
  496.         4       directory       (excluded from normal searches)
  497.         5       archive         (set when modified)
  498.         6       reserved
  499.         7       reserved
  500.     12      10      reserved
  501.     22       2      time created or updated
  502.  
  503.             FEDCBA9876543210
  504.             hhhhhmmmmmmsssss
  505.  
  506.             h - hours   (0-23)
  507.             m - minutes (0-59)
  508.             s - double seconds (0-29)
  509.     24              2       date created or updated
  510.  
  511.             FEDCBA9876543210
  512.             YYYYYYYMMMMDDDDD
  513.  
  514.             Y - year  (0 - 199) add 1980
  515.             M - month (1-12)
  516.             D - day   (1-31)
  517.     26      2       starting cluster
  518.     28      4       file size           (Least significant byte first.)
  519.  
  520. DISK TUTOR:
  521.  
  522.     What follows is a brief introduction to the internals of the DOS disk
  523.     structure.
  524.  
  525.     The smallest addressable portion of a disk is the sector.  A sector is
  526.     512 bytes long.  Even though a disk's capacity is measured in
  527.     megabytes, the disk itself is accessed by the software in terms of
  528.     logical sectors, numbered 0 through n.  (Underlying logical sectors are
  529.     the physical realities of heads, tracks, and sectors within each track.
  530.     But these are too ugly to consider here.)
  531.  
  532. The Boot Sector -
  533.  
  534.     The first sector on each disk, sector 0, is the boot sector.  Even if
  535.     the disk doesn't contain an operating system and is therefore not
  536.     bootable, it contains a boot sector applied by the high level format
  537.     program.
  538.  
  539.                     10
  540.  
  541.  
  542.  
  543.     Two types of data are included in the boot sector.  The physical
  544.     characteristics of the disk (total number of sectors on the disk,
  545.     sectors per cluster, etc) are found in the first part of the boot
  546.     sector.  You can view at this information with DUMP /boot.
  547.  
  548.     A bootstrap is stored in the second half of the boot sector. The
  549.     bootstrap is a small program which, on the basis of information found
  550.     in the first part of the sector, reaches out onto the disk, finds key
  551.     operating system files (e.g. IBMBIO.COM and IBMDOS.COM), loads them
  552.     into memory, and executes them thus bringing the system to life.
  553.  
  554.     If the required system files cannot be found on the disk, the familiar
  555.     "Non-System disk or disk error" message is printed out.  You can find
  556.     this message near the end of sector 0 with the command DUMP /disk=0.
  557.  
  558. The File Allocation Table -
  559.  
  560.     The File Allocation Table, affectionately known as the FAT, is the
  561.     method DOS uses to keep track of which disk sectors are used and which
  562.     are free.  The FAT is really a big lookup table.  Its starting sector
  563.     and length are known from the boot sector.  The entries, known as
  564.     allocation units or clusters, chain from one to another throughout the
  565.     FAT.  Cluster 5 might contain the value 6, which chains it to the sixth
  566.     cluster, which in turn might be chained to the tenth. A special code
  567.     marks the end of each chain.  In fact, many chains are only one link
  568.     long.
  569.  
  570.     Each FAT chain provides the system with a map to the sectors allocated
  571.     for each file.  Given a cluster number, you can mathematically
  572.     calculate its related sector's offset from the beginning of files area.
  573.     This cluster-to-sector mapping, when combined with the cluster chaining
  574.     property, provides a completely flexible sector methodology for file
  575.     creation and access.  Sectors can be accessed sequentially although
  576.     their physical locations may be randomly distributed across the disk,
  577.     and logical random access is likewise efficiently supported through the
  578.     same chaining mechanism.
  579.  
  580.     Each cluster or allocation unit maps to one or more sectors depending
  581.     on the size and type of disk.  This ratio, known as cluster size,
  582.     determines the minimum size of a file.  Suppose you want to store one
  583.     character.  One character requires one byte, but the minimum
  584.     addressable disk unit is the sector - 512 bytes.  So whether you're
  585.     storing one byte or 512, the disk requirements are the same, one sector.
  586.  
  587.     Suppose a disk's cluster size is 4.  That means each cluster in the FAT
  588.     points to a group of four sectors.  Even though a one-byte file may
  589.     require only one disk sector, four are effectively used (allocated)
  590.     because their single common cluster is used by that first sector. This
  591.     is why, in an XDIR /full listing, you may see 2048 bytes (4 sectors)
  592.     allocated for even the smallest file.
  593.  
  594.     In view of the inherent waste in multiple sector clusters, you may well
  595.     ask why larger clusters are used at all.  There are several good
  596.  
  597.                     11
  598.  
  599.  
  600.     reasons. Multiple sector clusters raise disk I/O efficiency when large
  601.     data transfers take place.  Because all sectors of a cluster are
  602.     contiguous, the underlying software can support multi-sector reads when
  603.     loading executable files, for instance.  Large clusters give rise to a
  604.     smaller, more efficient FAT.  A four sectors/cluster FAT takes only one
  605.     quarter the disk and in-memory buffer space that a single
  606.     sector/cluster arrangement requires.  In addition, the
  607.     greater-than-32MB-disks supported by DOS 4 and 5 are possible only
  608.     because each cluster references more than one sector.  The unsigned 16
  609.     bit cluster can address only 64k sectors - 32MB.  Multiple sectors per
  610.     cluster increase that top disk limit by the multiple factor. So you
  611.     see, there are positive trade-offs in the sectors-per-cluster question.
  612.  
  613.     Depending on the size of a disk, DOS will use either 12 or 16 bit
  614.     clusters.  The smaller cluster size allows up to 4k entries while the
  615.     larger, as previously mentioned, permits 64k.
  616.  
  617.     Some cluster values have special meanings.  The first two entries of
  618.     the FAT (0 and 1) are reserved.  Cluster 2 is the first valid cluster.
  619.     The special cluster values are:
  620.  
  621.     16 bit cluster  12 bit cluster
  622.  
  623.     0               0               -  free cluster
  624.     FFF0 - FFF6H    FF0 - FF6H      -  reserved cluster
  625.     FFF7H           FF7H            -  bad cluster
  626.     FFF8 - FFFFH    FF8 - FFFH      -  last cluster in chain
  627.  
  628.     You can see that with the exception of the free cluster marker (0),
  629.     they are all near the upper limit of the cluster address range.
  630.  
  631.     You should also note that if an area of the disk is bad, the formatter
  632.     will mark the whole cluster as bad.  Any good sectors within that
  633.     cluster are unreachable by normal FAT-based I/O.  This is not a
  634.     significant problem in practice.  Bad spots on disks tend to span
  635.     several sectors and often several clusters.
  636.  
  637.     A bad FAT, for obvious reasons, is catastrophic. Some disks support
  638.     multiple FAT's incase one becomes unreadable during use.
  639.  
  640. Directories -
  641.  
  642.     The FAT keeps track of which sectors belong to which files and which
  643.     sectors are free.  Directories give names to files and impose the
  644.     hierarchical file structure on the disk which, since the advent of the
  645.     UNIX (TM) operating system in the early 1970's, has become standard in so
  646.     many other operating systems.
  647.  
  648.     Directory entries are 32 bytes long, 16 to the sector.  They contain
  649.     the file name, extension, file attribute, reserved area, date and time
  650.     of creation or last update, starting cluster, and file size. (See DUMP
  651.     - BOOT_TABLES)
  652.  
  653.     Besides the file name, the most significant part of the directory entry
  654.  
  655.                        12
  656.  
  657.  
  658.     is the starting cluster.  This points to the first cluster of a cluster
  659.     chain in the FAT and to the physical location of the file on the disk.
  660.  
  661.     The file attribute gives special meaning to certain files.  The
  662.     attributes are:
  663.  
  664.     Hidden file
  665.     System file
  666.     Volume label
  667.     Directory
  668.     Archive  (Pending)
  669.  
  670.     There can be only one Volume label on a disk, and it must be in the
  671.     root directory.  Its 11 characters are held in the file name and
  672.     extension sections of the entry.
  673.  
  674.     Before they're first used, directory entries contain null (0)
  675.     characters in the file name.  As files are added, their names are
  676.     entered starting at the top of the directory.
  677.  
  678.     Files are deleted by overwriting the first character of the name with
  679.     the lower case sigma character (229).  The FAT entries are free, but,
  680.     as far as the directory is concerned, no other information is changed.
  681.     This is why special utilities can "unerase" a file (except for
  682.     recovering the first character of its name).
  683.  
  684.     The next time a file is added to a directory, it overwrites the first
  685.     record it finds marked as deleted, or in the absence of any of these,
  686.     it uses the first null entry.
  687.  
  688.     When a directory is searched, the search stops at the first null entry.
  689.     There is no more data to be found.  Thus a directory which once held
  690.     many files takes noticeably longer to search than a nearly empty one,
  691.     even after most of those files are deleted.  Searches must still
  692.     continue to the old high water mark.
  693.  
  694. The Root Directory -
  695.  
  696.     There are two kinds of directories in DOS: the root directory and
  697.     subdirectories.  The root (top level) directory has its roots in the
  698.     first version of DOS in which it was the only directory.  The root
  699.     directory is not allocated via the FAT, but is of a fixed length whose
  700.     size is dependent upon the disk type.  It is located after the FAT(s)
  701.     and before the files area, where the FAT mapping begins.  Its length
  702.     and location is one of those constants specified in the boot sector.
  703.     (Try DUMP /boot.) Once you fill up the root directory, it's filled up.
  704.  
  705.     Subdirectories, on the other hand, are mapped by the FAT, are
  706.     extensible, and can reside anywhere.  They never can be filled up
  707.     although too-large subdirectories are awkward and slow.
  708.  
  709.     Subdirectories are distinguished from root directories in that the
  710.     former have entries to themselves and to their parent directories, the
  711.     familiar "." and ".." files.
  712.  
  713.                        13
  714.  
  715.  
  716.  
  717.     The distinction between the root directory and subdirectories is hidden
  718.     from both the user and from the programmer who uses BIOS calls. Only
  719.     those foolish enough to grovel in the lower reaches of DOS ever need be
  720.     concerned with those subtle differences.
  721.  
  722.  
  723.                        14
  724.  
  725.  
  726. SEARCH
  727.     Quickly and silently locates text strings in any file anywhere on your 
  728.     whole disk.  The simplicity of this favorite program belies its power 
  729.     and usefulness.
  730.  
  731. usage:
  732.     Search  file_spec  "text string"  [/Comand_Modifiers...]
  733.  
  734. file_spec:
  735.     A wildcarded recursive file specification.
  736.  
  737.     "Text string" may be quoted or unquoted depending on whether it contains
  738.     special characters which may affect command execution (eg: blanks or '/').
  739.  
  740. Command Modifiers:
  741.  /before    /case     /numbers    /pause    /since
  742.  
  743.  
  744.  
  745. EXAMPLES:
  746.  
  747.     Flag any C language source files in the program subdirectories on the
  748.     current drive which call the binary_search() function.
  749.  
  750.         SEARCH \user\pgm...*.c binary_search(
  751.  
  752.     Normally searches are made independent of the case of either the search
  753.     string or of the text in the files being searched.  This case
  754.     insensitive default would yield a match on a file containing the text
  755.     "ABCDEF" against the requested string "AbCdEf".
  756.  
  757.     Make a case-sensitive search of all files in the letters subdirectory
  758.     for the name Smith.  This search would not find "blacksmith" because of
  759.     case-sensitivity.
  760.  
  761.         SEARCH C:\admin\letters Smith /case
  762.  
  763.     Search all files in the current directory for the phrase "Wall Street",
  764.     outputing the line number as well as the entire line in which the
  765.     phrase occurs.
  766.  
  767.         SEARCH * "Wall Street" /numbers
  768.  
  769.     Note the use of quotes to include blanks and tabs in a search.  Without
  770.     the quotes, * Wall Street would have appeared to the program as three
  771.     arguments instead of the require two.
  772.  
  773.     Locate all letters referencing airline travel in the current directory
  774.     written between June 1st and July 15th.
  775.  
  776.         SEARCH *.ltr air /since=1-June /before=15-July
  777.  
  778.     Flag all references to Pittsburgh in your manuscript, output the line
  779.     in which the reference occurs with the two following lines, and
  780.  
  781.                        15
  782.  
  783.  
  784.     redirect the output to a file.
  785.  
  786.         SEARCH chaptr*.doc Pittsburgh > pgh.ref /context=3 /nopause
  787.  
  788.     Note that /nopause should be used when output is redirected to a file
  789.     or to the printer.
  790.  
  791.     Demonstrate a search of binary files in a directory holding system
  792.     programs.
  793.  
  794.         SEARCH C:\DOS Copyright
  795.  
  796.  
  797. NOTES:
  798.  
  799. Binary -
  800.  
  801.     The search command can scan both binary as well as ASCII text files
  802.     while looking for a text string entered as a command line argument.
  803.  
  804.     The interpretation of exactly what consitutes a line is different
  805.     in the two cases.  A line in a text file is denoted by a carriage
  806.     return/line feed sequence (newline character).  When the text
  807.     string is found, the entire line containing that string is
  808.     displayed.
  809.  
  810.     In a binary file, the carriage return/line feed sequence has no
  811.     special meaning and may be randomly distributed throughout the file.
  812.     For this case, a line is defined as 512 bytes.  When the text string
  813.     is found, the text string and enough printable context to total
  814.     approximately 70 characters is displayed.  Null characters are taken
  815.     as absolute delimiters before and beyond which text is not displayed
  816.     and may limit the displayed text to substantially less than 70
  817.     characters.  The remainder of the 512 byte line is scanned for
  818.     additional matches and, if found, are displayed separately.  Unlike
  819.     text files, matching text is searched for across line boundaries in
  820.     binary files.
  821.  
  822.     The search command attempts to determine whether a file is binary or
  823.     text by reading the first 1024 bytes and scanning for included null
  824.     characters.  If found, these are interpreted as indicating a binary
  825.     file.  The alternate method of searching for the carriage return/line
  826.     feed sequence would impose a maximum line length on text files.
  827.  
  828.  
  829.                        16
  830.  
  831.  
  832. SPLIT
  833.     Breaks text files into pieces or segments by four methods.  Specify 
  834.     the number of segments, the length of each segment, that breaks be 
  835.     made at certain lines, or that breaks be made only at lines containing 
  836.     specific search text.
  837.     
  838. usage:
  839.     split  input_file  [/Comand_Modifiers...]
  840.  
  841. Input_file:
  842.     A wildcarded recursive file specification.
  843.  
  844. Output Files:
  845.     Output files, if any, are generated using the names of the
  846.     original files with extensions .001, .002, .003, etc.
  847.  
  848. Command Modifiers:
  849. /after    /at    /before    /every    /into    /pause
  850.  
  851.  
  852.  
  853. EXAMPLES:
  854.  
  855.     Split all files ending in .BIG on the current drive into files no
  856.     larger than 1000 lines each.
  857.  
  858.         SPLIT \...*.big /every=1000
  859.  
  860.     The new split files will assume the names of their parents but will be
  861.     given the extensions .001, .002, .003, etc.
  862.  
  863.     Split a file into five equal pieces.
  864.  
  865.         SPLIT work_c /into=5
  866.  
  867.     The split is made by line count, not by file size.  Each piece will
  868.     have the same number of lines, if possible.
  869.  
  870.     Divide a file at lines 235, 609, and 964.
  871.  
  872.         SPLIT book.ms /at=235,609,964
  873.  
  874.     /At makes the enumerated lines the first one in each new file.  This
  875.     example yields four files:
  876.  
  877.              source lines
  878.         BOOK.001    1       - 234
  879.         BOOK.002    235     - 608
  880.         BOOK.003    609     - 963
  881.         BOOK.004    964     - end
  882.  
  883.     Files can also be divided base on text found in the file.  If you want
  884.     to split a file everywhere after the text " END" occurs in a
  885.     concatenated collection of FORTRAN files, the command
  886.  
  887.                        17
  888.  
  889.  
  890.  
  891.         SPLIT lib1.for /after=" END"
  892.  
  893.     creates a new file for each occurrence of the FORTRAN END.  If only a
  894.     single fine END statement is found, no split is made.
  895.  
  896.     Text-based splits can also be made before lines containing the target
  897.     text is found.  Split all files in the current directory beginning with
  898.     a "T" and with extension .IGS before lines containing the string "SHEET
  899.     NO." unless that string occurs only in the first line of the file.
  900.  
  901.         SPLIT t*.igs /before="SHEET NO."
  902.  
  903.                        18
  904.  
  905.  
  906. SUB
  907.     Substitutes characters in lines in text files.  This program deletes 
  908.     characters, add characters, replaces tabs with spaces, and replaces 
  909.     spaces with any size tabs.  It strips trailing blanks from lines or 
  910.     pads out each line to a fixed length.
  911.     
  912.     SUB can also limit its operations to lines containing search strings 
  913.     and anchor operations to that text.
  914.     
  915.     This utility is useful for dynamically creating complex batch and 
  916.     script files based on directory contents.  This is one of those 
  917.     utilities for which you may see no need - until you need it, and then 
  918.     it's indispenable.
  919.     
  920. usage:
  921.         sub  input_spec  [output_file]  [/Comand_Modifiers...]
  922.  
  923. input_spec:
  924.     A wildcarded recursive file specification.
  925.  
  926. Output File:
  927.     If no output_file is specified, the output_file takes the name of
  928.     the input_file, and the input_file is given the extension ".BAK".
  929.  
  930. Command Modifiers:
  931. /at        /bak       /before     /copy     /delete     /for      /from
  932. /insert    /noexpand  /pad        /pause    /silent     /strip    /tabs
  933. /truncate
  934.  
  935.  
  936.  
  937. EXAMPLES:
  938.  
  939.     SUB commands normally are applied to each line of one or more files.
  940.     There are roughly three categories of Command Modifiers which can be
  941.     used with the SUB command: /pad, /strip, /tabs, and /truncate apply to
  942.     whole lines; /copy, /delete, and /insert apply to specified columns
  943.     within a line; and /at, /before (the same as /at) , /for, and /from
  944.     indicate in which columns the action is to take place.
  945.  
  946.     Insure that all lines of a file are 120 character long (excluding the
  947.     carriage return).
  948.  
  949.         SUB list.txt /pad=120
  950.  
  951.     Insure that no line of a file exceeds 30 characters.
  952.  
  953.         SUB list.txt /truncate=30
  954.  
  955.     Strip trailing blanks from those lines which contain them.
  956.  
  957.         SUB list.txt /strip
  958.  
  959.     Replace multiple spaces with tab characters where possible.
  960.  
  961.                        19
  962.  
  963.  
  964.  
  965.         SUB list.txt /tab
  966.  
  967.     In this case, tab size is assumed to be (modulo) eight spaces.
  968.  
  969.     Replace all tabs with spaces in .C files edited with a 4-column-tab
  970.     editor for compatibility with itself and the rest of the world.
  971.  
  972.         SUB *.c /notab=4
  973.  
  974.     In all files ending in .C on the current drive, replace 4 column tabs
  975.     with eight column tabs.
  976.  
  977.         SUB \...*.c /notab=4/tab=8
  978.  
  979.     Now let's turn to operations requiring pointers to locate the columns
  980.     in which the operations are to take place.
  981.  
  982.     Delete the first four columns of every line.
  983.  
  984.         SUB list.txt /delete=4
  985.  
  986.     causes four characters to be deleted, but which four?  Unless otherwise
  987.     stated, there is an implied pointer to column 1, an implied /at=1 or
  988.     /before=1.  It is always better to state assumptions.
  989.  
  990.         SUB list.txt /delete=4 /at=1
  991.  
  992.     To shift all text one inch to the right for printing and binding
  993.     requires
  994.  
  995.         SUB report /insert="          " /before=1
  996.  
  997.     Insertion text containing tabs or blanks must be quoted.  This text,
  998.     eight blanks, must therefore be quoted.
  999.  
  1000.     Duplicate columns 10 through 13, inserting them before column 20 in
  1001.     each line of a file.
  1002.  
  1003.         SUB table.2 /copy=10,13 /before=20
  1004.  
  1005.     All text after column 20 is shifted four columns to the right.  Nothing
  1006.     is deleted or overwritten unless that action is specifically requested
  1007.     with /delete.
  1008.  
  1009.     You may not always know the exact columns in a file in which the
  1010.     operation should take place.  Operations can be tied to specific text
  1011.     in each line with the /for modifier rather than to particular columns.
  1012.     In a file with the lines
  1013.  
  1014.         image1.dat
  1015.         imagetst.dat
  1016.         screen.iq
  1017.  
  1018.  
  1019.                        20
  1020.  
  1021.  
  1022.     the command
  1023.  
  1024.         SUB x y /for=.  /delete=4
  1025.  
  1026.     creates the new file Y containing
  1027.  
  1028.         image1
  1029.         imagetst
  1030.         screen
  1031.  
  1032.     /For=text is, in effect, a variable /at or /before.
  1033.  
  1034.     If the /for text occurs more than once in a line, you can restrict the
  1035.     search for that text to a specific range within the line.
  1036.  
  1037.         SUB filelist.2 /delete=4 /for=.bat /from=15,30
  1038.  
  1039.     restricts the search for the string ".bat" to columns 15 through 30.  A
  1040.     file containing duplicate text
  1041.  
  1042.         autoexec.bat  autoexec.bat
  1043.         config.sys    config.sys
  1044.         x.bat         x.bat
  1045.  
  1046.     is changed to
  1047.  
  1048.         autoexec.bat  autoexec
  1049.         config.sys    config.sys
  1050.         x.bat         x
  1051.  
  1052.     after processing.  Lines missing the target text ".bat" are skipped.
  1053.  
  1054.     Illustrate the importance of the order of execution as multiple
  1055.     operations are applied to a file.  In a file with the line
  1056.     "123456789abcdef", replace "567" with "abc".  /Copy without /delete
  1057.     results in an insertion rather than a replacement.  Modified by
  1058.  
  1059.         SUB x y /at=5 /delete=3
  1060.  
  1061.     the line becomes "123489abcdef".  Modifying the result by
  1062.  
  1063.         SUB y z /at=5 /copy=7,9
  1064.  
  1065.     yields "1234abc89abcdef".  These two operations to replace "567" by
  1066.     "abc" (columns 5 - 7 with 10 - 12) can be applied by the single command
  1067.  
  1068.         SUB x z /copy=7,9 /at=5 /delete=3
  1069.  
  1070.     Notice that although the order in which Command Modifiers are placed on
  1071.     the command line is unimportant and has no effect on the order of
  1072.     execution, the order of execution is critical and is fixed by
  1073.     convention.  (See Notes Order of Execution.)
  1074.  
  1075.                        21
  1076.  
  1077.  
  1078.     Where ever the string "Copyright 1990" occurs in .HEL files, replace it
  1079.     with "Copyright 1991".
  1080.  
  1081.     SUB *.hel * /for="copyright 1990" /delete=14 /insert="Copyright 1991"
  1082.  
  1083.     SUB can be used to accomplish global changes across many files, but it
  1084.     is rather tricky.  Since the /for command modifier is really a dynamic
  1085.     /at=column, you must specify /delete or "Copyright 1991" will simply be
  1086.     inserted before "copyright 1990", not exactly the replacement operation
  1087.     desired.  The /for string is case insensitive.  With the /insert
  1088.     string, however, you get the case you specify.
  1089.  
  1090.     All matching files are updated (copied) whether there are changes or
  1091.     not.
  1092.  
  1093.     Illustrate SUB's limited ability to rename files.  In all files in the
  1094.     current directory beginning with a "T" and with extension .DAT, delete
  1095.     columns 15 - 21 of each line and store the results in similarly named
  1096.     files with the extension .S1.
  1097.  
  1098.         SUB t*.dat *.s1 /delete=6 /at=15
  1099.  
  1100.  
  1101. NOTES:
  1102.  
  1103. File Renaming Conventions -
  1104.  
  1105.     There are three ways to specify the output filename[s] for the SUB
  1106.     command.
  1107.  
  1108.     Case 1:
  1109.  
  1110.     SUB  file_1
  1111.  
  1112.     file_1 is read and renamed file_1.BAK at the command's conclusion.
  1113.     file_1 is the name given to the newly created file.
  1114.  
  1115.     Case 2:
  1116.  
  1117.     SUB  file_1  file_2
  1118.  
  1119.     file_1 is read.
  1120.     file_2 is created.
  1121.  
  1122.     Only in Case 2 are files permitted to be in different directories or on
  1123.     different drives.
  1124.  
  1125.     Case 3:
  1126.  
  1127.     SUB  *.ext1  *.ext2
  1128.  
  1129.     .ext1 files are read.
  1130.     .ext2 files are created.
  1131.  
  1132.  
  1133.                     22
  1134.  
  1135.  
  1136.     General wildcards are permitted in the file_1 name.  A single
  1137.     all-inclusive wildcard is permitted in the file_2 name but not in the
  1138.     extension.
  1139.  
  1140.     SUB  file_1  *
  1141.          and
  1142.     SUB  file_1  *.*
  1143.     are the same as Case 1 "SUB  file_1".
  1144.  
  1145.     Internal logic insures that the input and output filenames are not
  1146.     identical: that an output file cannot overwrite itself.  An output file
  1147.     can, however, overwrite another file.
  1148.  
  1149. Order of Execution -
  1150.  
  1151.     The order of application of multiple Command Modifiers to each line of
  1152.     the file is:
  1153.  
  1154.     /notab  /delete  /insert  /copy  /truncate  /pad  /strip  /tab
  1155.  
  1156.     This order helps insure intended, predictable, and uniform results.
  1157.  
  1158.  
  1159.                     23
  1160.  
  1161.  
  1162. XDEL
  1163.     Recursively deletes files and removes directories operating in either 
  1164.     the default normal mode or in a secure overwrite mode.
  1165.     
  1166.     XDEL deletes hidden, readonly, and system files or files by date.  
  1167.     Verification is available on the command, directory, or file levels,  
  1168.     or can be bypassed completely for batch operaions.
  1169.     
  1170.     The secure overwrite mode is flexible, allowing you to specify the 
  1171.     number of overwirtes and whether they are with random data or with 
  1172.     patterns of your own choosing.
  1173.     
  1174. usage:
  1175.     xdel  file-spec  [/Command_Modifiers...]
  1176.  
  1177. file-spec:
  1178.     A wildcarded recursive file specification.
  1179.  
  1180. Command_Modifiers:
  1181.  
  1182. /before    /directories  /hidden  /list    /modified    /patterns   /pause
  1183. /readonly  /secure       /since   /system  /unmodified  /verify
  1184.  
  1185.  
  1186. EXAMPLES:
  1187.  
  1188.     If NAME is a file, delete it.  If it is a directory, delete all files
  1189.     within it (not recursively), and then remove it if empty.
  1190.  
  1191.         XDEL name
  1192.  
  1193.     Delete the contents of the current directory but no subdirectories.
  1194.  
  1195.         XDEL *.*
  1196.  
  1197.     Delete the contents of the current directory and recursively the
  1198.     contents of all subdirectories.
  1199.  
  1200.         XDEL ...
  1201.  
  1202.     Delete all files in the current directory and recursively in all
  1203.     subdirectories below it verifying only at the directory level.
  1204.  
  1205.         XDEL ...  /verify
  1206.  
  1207.     Delete all .BAK files from the C: drive.
  1208.  
  1209.         XDEL c:\...*.bak
  1210.  
  1211.     Delete all files from the A: drive leaving the directory structure
  1212.     intact.
  1213.  
  1214.         XDEL a:\...  /nodirectories
  1215.  
  1216.  
  1217.                     24
  1218.  
  1219.  
  1220.     Delete all files with the extension .LTR in the current directory
  1221.     created before yesterday appending their names to a file as they are
  1222.     deleted.
  1223.  
  1224.         XDEL *.ltr /before=yesterday /list=all /nopause >> deleted.log
  1225.  
  1226.     Delete the backup files on drive A: which are marked readonly.
  1227.  
  1228.         XDEL a:*.* /readonly
  1229.  
  1230.     Delete all files with the extension .LTR from the current directory
  1231.     overwriting them with random numbers two times, and a final time with
  1232.     zero's.
  1233.  
  1234.         XDEL *.ltr /secure=3/pattern=0
  1235.  
  1236.     While requesting verification at the directory and file levels, delete
  1237.     all files under the \USER directory which are unmodified (already
  1238.     backed up).
  1239.  
  1240.         XDEL \user...  /unmodified /verify=all
  1241.  
  1242.     Hint: When in doubt about the exact effect of an XDEL file spec syntax,
  1243.     try it first with the XDIR command which is similar in operation and a
  1244.     lot safer!
  1245.  
  1246.  
  1247. NOTES:
  1248.  
  1249. XDIR and XDEL Contrasted -
  1250.  
  1251.     In general, the xdel command parallels the xdir command quite closely
  1252.     in operation.  If you want to delete a certain set of files, especially
  1253.     with recursive deletes, you may want to try the same syntax with the
  1254.     xdir command first.  There are some significant differences, however.
  1255.  
  1256.     The attributes modifiers are exclusive with xdir and inclusive with
  1257.     xdel.  The command "xdir *.* /readonly" will list ONLY readonly files.
  1258.     "xdel *.* /readonly" must be used to delete readonly files and will
  1259.     delete readonly files AS WELL AS normal files.  To delete the standard
  1260.     system files, for example, requires a /system /hidden and /readonly
  1261.     combination.
  1262.  
  1263.     The xdir and xdel commands both do depth first descents on recursive
  1264.     operations, traveling down each successive subdirectory tree to the
  1265.     bottom before retracing upward to take alternate paths.  The order
  1266.     of operation is different, however.  Xdir lists each entire subdirectory
  1267.     as it is encountered while xdel travels the entire extent of the
  1268.     first branch before it begins to delete.  Only when it encounters
  1269.     a subdirectory with no subdirectories within it does it begin file
  1270.     deletion.  Then it backs out of the now empty subdirectory, removes
  1271.     it, and continues to process, trying to descend first, and then when
  1272.     at the bottom, deleting.  The very last directory whose contents are
  1273.     deleted is the top level directory.  The operation also takes place
  1274.  
  1275.                     25
  1276.  
  1277.  
  1278.     in alphabetic order.  If, horror of horrors, you discover that you're
  1279.     deleting the wrong tree and do a frantic <CTRL> C or hit the Big Red
  1280.     Switch, upon recovery you should be able to tell pretty easily where
  1281.     the delete stopped.  (This is NOT recommeded procedure!)
  1282.  
  1283.     During a delete, if your current directory is in a path being deleted,
  1284.     the current directory and its parent directories are not removed.
  1285.     Files continue to be deleted as requested.  (See xdel -help /directory
  1286.     for examples.)
  1287.  
  1288.     Volume labels (attribute V in the dump command) are not deletable by
  1289.     xdel.
  1290.  
  1291. Secure Deletes -
  1292.  
  1293.     /Secure deletes remove all directory information for all deleted files
  1294.     within the delete path, independent of when those files were deleted.
  1295.  
  1296.     You can remove all directory information about all previous files
  1297.     on the entire disk by requesting a /secure delete on a non-existent
  1298.     file (e.g. xdel \...*.qqq /secure).  Directory information would be
  1299.     removed, but there is no easy or complete way to overwrite sectors
  1300.     once they are deallocated.  (Creating a hugh file to scavenge all
  1301.     free clusters and then doing a /secure delete on that file would help
  1302.     but would not be a complete answer.  See the example below.)
  1303.  
  1304.     Demonstrate that overwriting a disk sector with a new file may not
  1305.     remove all the orignal data.  (See /secure.)
  1306.  
  1307.     Create a small file with the sequence
  1308.     copy  con  x
  1309.     Hi! <Ctrl>Z
  1310.  
  1311.     and use dump to dump the disk sector used by file x:
  1312.     dump  x  /cluster
  1313.     dump  /disk=n,m      ; where n,m are the sectors used by x's cluster.
  1314.  
  1315.     If you are working with an old, much-used disk, you'll see previously
  1316.     deleted data which was not overwritten by the creation of x and will
  1317.     never have a chance of being overwritten until the little file x is
  1318.     first extended or itself deleted.
  1319.  
  1320.     No attempt is made during a secure delete to overwrite the FAT multiple
  1321.     times or with random data.  It is just too dangerous, and there can be
  1322.     multiple FAT's.  The most information anyone could get from your FAT
  1323.     with analysis of the once-overwritten information would be the chain
  1324.     of clusters comprising your securely deleted file.  And that assumes
  1325.     he could get the starting cluster.  Security ultimately rests in the
  1326.     secure deletion of the data itself, not of pointers to it from the FAT
  1327.     or from the directory entry.
  1328.  
  1329.                     26
  1330.  
  1331.  
  1332. XDIR
  1333.     Recursively lists files in directory trees giving subtotals and 
  1334.     grandtotals of file sizes and disk allocations.  Bottom line 
  1335.     enthusiasts can specify totals or grandtotals only - without file 
  1336.     detail.  Directories are displayed in UPPER case and regular files in 
  1337.     lower case for easy discrimination.  The defualt sort order is 
  1338.     alphabetic unless you request ordering by file size or date.
  1339.     
  1340.     Searches can specify hidden, readonly, system, or modified files only, 
  1341.     and can limit the scope of a search before or after any time and date, 
  1342.     or us the generic keywords "yesterday" and "today".
  1343.     
  1344. usage:
  1345.     xdir  [file-spec]  [/Command_Modifiers...]
  1346.  
  1347. file-spec:
  1348.     A wildcarded recursive file specification.  If none is given, the
  1349.     current directory is assumed.
  1350.  
  1351. Command Modifiers:
  1352. /allocated /archive   /attributes  /before    /bydate  /bysize     /columns
  1353. /date      /debug     /directories /foot      /full    /grandtotal /heading
  1354. /hidden    /modified  /pause       /readonly  /since   /size       /system
  1355. /total
  1356.  
  1357.  
  1358.  
  1359. EXAMPLES:
  1360.  
  1361.     List all files in the current directory and recursively in all
  1362.     subdirectories below it.
  1363.  
  1364.         XDIR ...
  1365.  
  1366.     Produce a full listing to reveal all that is known about all files in
  1367.     the current directory.
  1368.  
  1369.         XDIR /full
  1370.  
  1371.     Rather than ask for a /full listing, you can specify any combination of
  1372.     the components of a /full listing:
  1373.  
  1374.         /size
  1375.         /allocated
  1376.         /date
  1377.         /attributes
  1378.  
  1379.     Determine how much space you could save on your disk by deleting all
  1380.     the .BAK files from the current directory.
  1381.  
  1382.         XDIR *.bak /allocated
  1383.  
  1384.  
  1385.                     27
  1386.  
  1387.  
  1388.     Find the total size by directory of all files on the C: drive.
  1389.  
  1390.         XDIR c:\...  /total
  1391.  
  1392.     Find the total number, size, and allocation of all .DOC files on the
  1393.     current drive.
  1394.  
  1395.         XDIR \...*.doc /grandtotal
  1396.  
  1397.     List all files under the \USER directory modified since the last backup.
  1398.  
  1399.         XDIR \user...  /modified
  1400.  
  1401.     Estimate how many diskettes will be needed for the next incremental
  1402.     backup.
  1403.  
  1404.         XDIR \...  /modified /grandtotal
  1405.  
  1406.     /Modified gives the same results as /archive.
  1407.  
  1408.     List all the files which have been created or changed today on the
  1409.     current drive.
  1410.  
  1411.         XDIR \...  /since=today
  1412.  
  1413.     List all the files in the DOCUMENT directory created or last updated in
  1414.     May.
  1415.  
  1416.         XDIR document /since=1-May /before=1-June
  1417.  
  1418.     Find the oldest program in your \DOS executable directory.
  1419.  
  1420.         XDIR \DOS /bydate
  1421.  
  1422.     The newest files sort to the top, the oldest to the bottom.
  1423.  
  1424.     List all files in the current directory sorted by size and which have
  1425.     been created or modification since the beginning of yesterday.
  1426.  
  1427.         XDIR /bysize /since=yesterday
  1428.  
  1429.     Check your whole disk for one or more copies of a misplaced document.
  1430.  
  1431.         XDIR \...northern.doc
  1432.  
  1433.     Check your disk for hidden or readonly files.
  1434.  
  1435.         XDIR \...  /hidden /readonly
  1436.  
  1437.     Output a list of all the files on your C: disk along with their sizes
  1438.     for later sorting by the DOS sort utility.
  1439.  
  1440.     XDIR c:\...  /size /noheading /nofoot /nodirectories /nopause>slist
  1441.  
  1442.  
  1443.                     28
  1444.  
  1445.  
  1446.     /Nodirectories is added because you aren't interested in including
  1447.     directories in your list.  /Nopause is necessary so that the output
  1448.     isn't hung up waiting for you to strike a key in response to invisible
  1449.     "more" messages.  /Noheading and /nofoot remove separating headers and
  1450.     feet from between directory contents resulting in one long list.
  1451.  
  1452.     Note that only the names of the files, not the directories in which
  1453.     they reside will be included.  Different files with the same name but
  1454.     residing in different directories will loose their unique identities.
  1455.  
  1456.     Find a file whose name you cannot remember and whose location you don't
  1457.     know.  You do recall that the file was called sales-something, or was
  1458.     it something-sales?  Use multiple wildcards and recursive notation to
  1459.     search the whole disk for it.
  1460.  
  1461.     XDIR  \...*sales*
  1462.  
  1463.     You have a directory named FINAL containing 175 files whose names you
  1464.     want to use in a listing documenting a new product.  Output the names
  1465.     in alphabetic order to a file for later editing.
  1466.  
  1467.     XDIR  final  /column=1  /noheading  /nofoot  /nopause  >  prod.lis
  1468.  
  1469.     Without /column=1 and in the absence of outputing any other file
  1470.     information (/size, /allocate, /date, or /attributes), the output would
  1471.     have defaulted to five columns wide, not the single-column listing
  1472.     format desired.
  1473.  
  1474.     Preserve an image of the directory structure of your C: drive.
  1475.  
  1476.     XDIR  c:\...  /directories  /nopause  >  dir_skel
  1477.  
  1478.     /Directories causes only directories to be listed.
  1479.  
  1480.     You're not sure about the ins and outs of the syntax of the date/time
  1481.     modifiers of the /before /since Command Modifiers and want to
  1482.     experiment using /debug to test their use.
  1483.  
  1484.     XDIR  /debug=date  /before=6-13,9
  1485.  
  1486.     Note that /debug=date must precede /before on the command line.  The
  1487.     program's interpretation of your entry is displayed, but no directory
  1488.     listing is made.  /Debug=path shows the full expansion of the file
  1489.     specification.
  1490.  
  1491.                     29
  1492.  
  1493.  
  1494. XHELP
  1495.  
  1496.     Supplements the help built into each command and becomes your first 
  1497.     stop if you don't know what you're looking for.  It contains a brief 
  1498.     description of each program in "DOS Extensions for Professionals" as 
  1499.     well as examples, notes, and discussions of features common to all 
  1500.     commands.
  1501.     
  1502. usage:
  1503.     xhelp  [Command]  [General Topics]  [-ALL]  [/nopause]
  1504.  
  1505. Commands:
  1506.  
  1507.     diff  dump  makehelp  search  split  sub  xdel  xdir  xhelp
  1508.  
  1509. General Topics:
  1510.     -BUG_REPORTING   -LICENSE   -MODIFIERS   -WILDCARDS
  1511.     
  1512. EXAMPLES:
  1513.     
  1514.     Type XHELP by itself to get a list of all the commands in "DOS 
  1515.     Extensions for Professionals".
  1516.     
  1517.     XHELP
  1518.     
  1519.     If you want a high level view of what a particular command does or a 
  1520.     list of its Command Modifiers, enter the command's name after XHELP.
  1521.     
  1522.     XHELP  split
  1523.     
  1524.     Notes and examples are also included with the list of command 
  1525.     modifiers.
  1526.     
  1527.     There are several general topics which, for your convenience, are also 
  1528.     stored on-line in XHELP.  Enter the general topic's name after XHELP
  1529.     
  1530.     XHELP  -bug_reporting
  1531.     
  1532.     If you forget which general topics are treated, enter
  1533.     
  1534.     XHELP  -
  1535.     
  1536.     for a listing of them all.
  1537.  
  1538.                     30
  1539.  
  1540.  
  1541. GENERAL TOPICS:
  1542.  
  1543.  
  1544. Command Modifiers
  1545.  
  1546.     Command Modifiers are special command line arguments which begin with
  1547.     a "/" and alter the basic command's action in some way as in
  1548.  
  1549.                xdir   /hidden
  1550.  
  1551.     Command Modifiers are delimited by a space or their "/" from the
  1552.     preceding command, command argument, or Command Modifier.
  1553.  
  1554.     The order of Command Modifiers among themselves or among other
  1555.     command arguments is unimportant.  (The order of other command
  1556.     arguments is, in general, significant.)
  1557.  
  1558.     Only enough characters to unambiguously identify a Command Modifier
  1559.     must be given after the "/".  Ambiguously matching entries are listed.
  1560.  
  1561.     A "/" by itself causes all possible Command Modifiers to be listed.
  1562.     A "-" by itself causes all possible Help Topics to be listed.
  1563.  
  1564.     Command Modifiers should be fully spelled out in batch files to
  1565.     avoid possible future ambiguities in case new Command Modifiers are
  1566.     ever added and for clearer documentation.
  1567.  
  1568.     Command Modifiers which require values are followed by an "=" and
  1569.     the value as in "/date=today".  Multiple values are "," separated.
  1570.  
  1571.  
  1572.  
  1573. Wildcards and Recursive Notation
  1574.  
  1575.     The wildcard and recursive notation supported by many of the DOS
  1576.     Extensions for Professionals' commands are a superset of DOS
  1577.     wildcards and can be applied to partial or complete DOS file
  1578.     specifications.
  1579.  
  1580.     C:\directory_path\filename.ext
  1581.  
  1582.     Wildcards apply exclusively to the filename portion of the
  1583.     specification and the recursive notation to the directory path.
  1584.  
  1585.     Supported notation:
  1586.  
  1587.     ?  -  matches a single character in a filename or extension.
  1588.  
  1589.     *  -  matches 0 or more characters in a filename or extension.
  1590.  
  1591.        ... -  matches 0 or more directory names in a recursive descent
  1592.           down a directory tree.
  1593.  
  1594.     Note that leading and multiple wildcards are supported.
  1595.  
  1596.                     31
  1597.  
  1598.  
  1599. Implied Wildcards:
  1600.  
  1601.     Some commands support implied wildcards.  Others do not.  In general,
  1602.     those commands which involve read-only activity such as dir, xdir, and
  1603.     search use the broader implied wildcards.  Commands such as sub, xdel,
  1604.     and copy, which alter files, do not support implied wildcards but
  1605.     enforce a stricter interpretation of the user's command.
  1606.  
  1607.     The ins and outs of implied wildcards are subtle.  Many people lead
  1608.     full and meaningful lives never consciously learning the rules.  They
  1609.     are meant to be natural.
  1610.  
  1611.     Implied wildcards are covered here so you won't be upset when some
  1612.     commands behave differently than others and so you'll understand why
  1613.     the details of the following examples don't hold for all commands.
  1614.  
  1615.     Notation    Implied Wildcard     Strict Interpretation
  1616.  
  1617.        xyz          xyz.*                xyz.
  1618.  
  1619.        xyz.         xyz.                 xyz.
  1620.  
  1621.        *            *.*                  *.
  1622.  
  1623.        C:           C:*.*  (XDEL)        C:  (DEL)
  1624.  
  1625.     The dir/xdir commands are peculiar in their approach to filenames which
  1626.     are directories.
  1627.  
  1628.       xdir  ABC        gives a listing of the CONTENTS of directory ABC.
  1629.  
  1630.       xdir  A*         ditto if A* is unique, otherwise it lists at the
  1631.                current level as in:
  1632.  
  1633.                 ABC
  1634.                 afile.dat
  1635.  
  1636.  
  1637.  
  1638. Examples of Wildcard and Recursive Notation:
  1639.  
  1640.       ...  or  ...*.*
  1641.         Match all files in this or any subordinate directories.
  1642.  
  1643.       \...*.c  or  \...\*.c
  1644.  
  1645.         Match all files ending with a .c extension found in any
  1646.         directory in the current drive.
  1647.  
  1648.       C:\dos...*op*.???  or C:\dos\...*op*.???  or C:\dos\...\*op*.???
  1649.  
  1650.         Match all files on the C: drive in the \DOS directory tree
  1651.         which contain the letters "op" and a three character
  1652.         extension.
  1653.  
  1654.                     32
  1655.  
  1656.  
  1657.       ..\...xyz  or  ..\...xyz.*  or  ..\...\xyz.*
  1658.  
  1659.         Match all files recursively descending from one level up
  1660.         from the current directory with the name xyz and any or no
  1661.         extension. 
  1662.  
  1663.       xyz.
  1664.         Match a file in the current directory with the name xyz
  1665.         and no extension.
  1666.  
  1667.       Note:     The ellipsis (...) must be the final portion of the path
  1668.         specification.  Split specifications
  1669.             (e.g. \abc\def\...\xyz\file.ext)
  1670.         are not supported.
  1671.  
  1672.  
  1673.  
  1674. Bug Reporting:
  1675.  
  1676.     Every effort has been made to thoroughly exercise DOS Extensions for 
  1677.     Professionals in a variety of circumstances.  The fact remains, 
  1678.     however, that no non-trivial work of software is completely bug free. 
  1679.  
  1680.     If you should encounter an operational anomaly, there are several 
  1681.     steps which you can take to make convergence on a solution as 
  1682.     efficient and painless as possible. 
  1683.     
  1684.     1.  Verify the repeatability of the occurrence that you haven't 
  1685.         made a typo or silly mistake.
  1686.     
  1687.     2.  Review the documentation.  Maybe the command is working 
  1688.         properly, but not the way you think it should.  (If an 
  1689.         operation is, in your opinion, too difficult or counter-
  1690.         intuitive, suggest a better solution.
  1691.     
  1692.     3.  Programs can fail from resource exhaustion.  In general, this 
  1693.         mode of failure is not a bug.  If an error message tells you 
  1694.         that you are out of memory or disk space, you probably are.  
  1695.         (The First Rule of Successful Computing: BELIEVE ALL ERROR 
  1696.         MESSAGES.  Surprisingly often they contain at least grain of 
  1697.         truth, especially when interpreted from the program's myopic 
  1698.         viewpoint.)
  1699.     
  1700.     4.  Try to discover the essence of the failure.  Reproduce it in 
  1701.         its simplest scenario.  This step is the hardest part of 
  1702.         tracing down a bug.  If you can do this, we'll have a much 
  1703.         better chance of correcting the underlying problem.
  1704.     
  1705.     5.  Suggest a work-around if possible or applicable.  
  1706.     
  1707.     6.  Send a clear explanation of the bug and the work you've done 
  1708.         to try to isolate it.  Send pertinent information about your 
  1709.         computer, its setup, and whether you've observed this failure 
  1710.         on other machines.  If the failure requires a lot of data or a 
  1711.         complicated scenario, send a disk configured to demonstrate it.
  1712.  
  1713.                     33
  1714.  
  1715.  
  1716.     7.  All correspondence will be given careful and thorough 
  1717.         consideration and, when practical, will be followed by prompt 
  1718.         action.
  1719.  
  1720.  
  1721.  
  1722. LEGALITIES
  1723.  
  1724. Copyright:
  1725.     
  1726.     The collection of software described in this file and contained on 
  1727.     this disk is the Shareware Version of "DOS Extensions for 
  1728.     Professionals" (the Software) and is Copyright 1991 John B. Allison.
  1729.  
  1730. Ownership:
  1731.     
  1732.     You have purchased or otherwise obtained media containing a copy of 
  1733.     the Shareware Version of "DOS Extensions for Professionals".  The 
  1734.     Software contained on the media and all rights pertaining thereto 
  1735.     remain the sole property of John B. Allison.  By continuing to use the 
  1736.     Software, you indicate your acceptance of the terms and conditions 
  1737.     outlined below.
  1738.     
  1739. Shareware License: 
  1740.     
  1741.     You are permitted to use the Software for an evaluation period of 
  1742.     THREE WEEKS.  After the evaluation period, you must either remove all 
  1743.     copies of the Software from your computer system(s) and refrain from 
  1744.     all additional use, or register your copy of the Software with
  1745.      
  1746.                 Allison Software
  1747.                  166 Shady Lane
  1748.               Apollo, PA  15613  USA
  1749.     
  1750.                  (412) 727-2198
  1751.               CompuServe 72600,1200
  1752.     
  1753.     (See the file REGISTER.DOC on the distribution disk for registration 
  1754.     instructions.)
  1755.  
  1756. Shareware Distribution:
  1757.     
  1758.     You may give copies of the Software IN ITS UNMODIFIED ENTIRETY to
  1759.     friends or to other parties.
  1760.  
  1761.     You may distribute copies of the Software IN ITS UNMODIFIED ENTIRETY
  1762.     on a commercial basis for a fee not to exceed SIX DOLLARS (US), or you
  1763.     may post the Software on electronic bulletin boards if you package the
  1764.     Software so that it must be downloaded as a single unit IN ITS
  1765.     UNMODIFIED ENTIRETY.
  1766.  
  1767.                     34
  1768.  
  1769.  
  1770. ASP Member:
  1771.  
  1772.     This program is produced by a member of the Association of Shareware
  1773.     Professionals (ASP).  ASP wants to make sure that the shareware
  1774.     principle works for you.  If you are unable to resolve a shareware-
  1775.     related problem with an ASP member by contacting the member directly,
  1776.     ASP may be able to help.  The ASP Ombudsman can help you resolve a
  1777.     dispute or problem with an ASP member, but does not provide technical
  1778.     support for members' products.  Please write to the ASP Ombudsman at
  1779.     545 Grover Road, Muskegon, MI 49442 or send a CompuServe message via
  1780.     CompuServe Mail to ASP Ombudsman 70007,3536.  The OMB may be contacted
  1781.     by FAX by sending to the ASP FAX number: (616) 788-2765.  In communi-
  1782.     cation with the OMB, please include a telephone number and/or FAX
  1783.     if available.
  1784.  
  1785.  
  1786. Limited Warranty:
  1787.  
  1788.     THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 
  1789.     EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED 
  1790.     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
  1791.     THE ENTIRE RISK AS TO THE QUALITY AND PERFOMANCE OF THIS SOFTWARE IS 
  1792.     YOURS.  SHOULD THIS SOFTWARE PROVE DEFECTIVE, YOU (AND NOT JOHN B. 
  1793.     ALLISON, ALLISON SOFTWARE, OR AN AGENT) ASSUME THE ENTIRE COST OF ALL 
  1794.     NECESSARY SERVICING, REPAIR, OR CORRECTION.
  1795.  
  1796.     SOME STATES DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE
  1797.     ABOVE EXCLUSION MAY NOT APPLY TO YOU.  THIS WARRANTY GIVES YOU SPECIFIC
  1798.     LEGAL RIGHTS, AND YOU MAY ALSO HAVE OTHER RIGHTS WHICH VARY FROM STATE
  1799.     TO STATE.
  1800.  
  1801.  
  1802. Limitation of Remedies:
  1803.  
  1804.     IN NO EVENT SHALL JOHN B. ALLISON, ALLISON SOFTWARE, OR AN AGENT BE
  1805.     LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION,
  1806.     DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF
  1807.     BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING OUT OF THE
  1808.     USE OF OR INABILITY TO US THIS SOFTWARE, EVEN IF JOHN B. ALLISON OR
  1809.     ALLISON SOFTWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  1810.     
  1811.     SOME STATES DO NOT ALLOW THE EXCLUSION OF LIABILITY FOR INCIDENTAL
  1812.     OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY
  1813.     NOT APPLY TO YOU.
  1814.  
  1815.     This agreement shall be governed by and construed in accordance with 
  1816.     the laws of the Commonwealth of Pennsylvania and the applicable laws 
  1817.     of the United States of America and shall inure to the benefit of John 
  1818.     B. Allison dba Allison Software and any successors, administrators, 
  1819.     heirs, and assigns.  Any action or proceeding brought by either party 
  1820.     against the other arising out of or related to this agreement shall be 
  1821.     brought only in a Commonwealth or Federal Court of competent 
  1822.     jurisdiction located in Allegheny County, Pennsylvania.  The parties 
  1823.     hereby consent to in personam jurisdiction of said courts.
  1824.